package cn.iocoder.yudao.hires.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.hires.entity.DictSchoolDO;
import cn.iocoder.yudao.hires.vo.DictSchoolPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 高校字典 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface DictSchoolMapper extends BaseMapperX<DictSchoolDO> {

    default PageResult<DictSchoolDO> selectPage(DictSchoolPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DictSchoolDO>()
                .likeIfPresent(DictSchoolDO::getName, reqVO.getName())
                .eqIfPresent(DictSchoolDO::getCode, reqVO.getCode())
                .eqIfPresent(DictSchoolDO::getType, reqVO.getType())
                .eqIfPresent(DictSchoolDO::getType1, reqVO.getType1())
                .orderByDesc(DictSchoolDO::getId));
    }

}